import { DefInfo } from "./info/DefInfo";
import { EEquip } from "../../../Message/Public/EEquip";
import { NameRule } from "../scene/player/entity/rule/NameRule";
import { ConfigManager } from "../../../com/gengine/resource/ConfigManager";
import { ESex } from "../../../Message/Public/ESex";
import { ItemData } from "./info/ItemData";
import { HTMLUtil } from "../../../com/gengine/utils/HTMLUtil";
import { StringHelper } from "../../../com/gengine/utils/StringHelper";
import { Vector } from "../../../__AS3__/vec/Vector";
type int = number;
//class GameDefConfig
    
    export  class GameDefConfig
    {
        constructor()
        {
            
            this._data = new Map<any, any> /* flash.utils.Dictionary */();
            this._xmlDic = new Map<any, any> /* flash.utils.Dictionary */();
            if (GameDefConfig._instance != null) 
            {
                throw new Error(" GameDefConfig 单例 ");
            }
            GameDefConfig._instance = this;
            this.init();
            return;
        }

        public getFahunMW(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("FanhunName", arg1);
            if (loc2) 
            {
                loc1 = loc2.text1;
            }
            return loc1;
        }

        public getVipHookMapData(): Array<any>
        {
            var loc1=this._xmlDic["VipHookMap"].item as Array<any>;
            return loc1;
        }

        /* internal  */write(arg1: Object): void
        {
            var loc2=null;
            var loc3=null;
            var loc4=null;
            var loc5=null;
            var loc1=arg1.items as Array<any>;
            var loc6=0;
            var loc7=loc1;
            for(loc2 of loc7) 
            {
                loc3 = loc2.type.toString();
                if (typeof loc2.item === "array") 
                {
                    var loc8=0;
                    var loc9=loc2.item as Array<any>;
                    for(loc5 of loc9) 
                    {
                        (loc4 = new DefInfo()).type = loc3;
                        loc4.name = loc5.text;
                        loc4.id = loc5.id;
                        loc4.text1 = loc5.text1;
                        loc4.text2 = loc5.text2;
                        loc4.text3 = loc5.text3;
                        loc4.value = loc5.value;
                        this.addItem(loc4);
                    }
                }
                else 
                {
                    (loc4 = new DefInfo()).type = loc3;
                    loc4.name = loc2.item.text;
                    loc4.id = loc2.item.id;
                    loc4.text1 = loc2.item.text1;
                    loc4.text2 = loc2.item.text2;
                    loc4.text3 = loc2.item.text3;
                    loc4.value = loc2.item.value;
                    this.addItem(loc4);
                }
                this._xmlDic[loc3] = loc2;
            }
            return;
        }

        /* internal  */addItem(arg1: DefInfo): void
        {
            this._data[arg1.type + "-" + arg1.id] = arg1;
            return;
        }

        public getItem(arg1: string, arg2: int): DefInfo
        {
            return this._data[arg1 + "-" + arg2] as DefInfo;
        }

        public getRewardDef(arg1: int): DefInfo
        {
            return this.getItem("reward", arg1);
        }

        public getEntityDef(arg1: int): DefInfo
        {
            return this.getItem("entity", arg1);
        }

        public getEEquipDef(arg1: int): DefInfo
        {
            return this.getItem("EEquip", arg1);
        }

        public getESpiritEquipDef(arg1: int): DefInfo
        {
            return this.getItem("ESpiritEquip", arg1);
        }

        public getEPetEquipDef(arg1: int): DefInfo
        {
            return this.getItem("EPetEquip", arg1);
        }

        public getEWeaponName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("EWeapon", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getEJewelArray(): Array<any>
        {
            return this._xmlDic["EJewel"].item;
        }

        public getEJewel(arg1: int): DefInfo
        {
            return this.getItem("EJewel", arg1);
        }

        public getEBind(arg1: int): DefInfo
        {
            return this.getItem("EBind", arg1);
        }

        public getJewelLevel(arg1: int): DefInfo
        {
            return this.getItem("JewelLevel", arg1);
        }

        public getEPrefixx(arg1: int, arg2: int): DefInfo
        {
            var loc1=null;
            if (arg2 == EEquip._EEquipHeartLock) 
            {
                loc1 = new DefInfo();
                loc1.id = arg1;
                loc1.name = arg1 + "♡";
                return loc1;
            }
            return this.getItem("EPrefix", arg1);
        }

        public getECategory(arg1: int): DefInfo
        {
            return this.getItem("ECategory", arg1);
        }

        public getECamp(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("ECamp", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getCampShort(arg1: int): DefInfo
        {
            return this.getItem("ECampShort", arg1);
        }

        public getForceShort(arg1: int): DefInfo
        {
            return this.getItem("force", arg1);
        }

        public getDominionForceShort(arg1: int): DefInfo
        {
            var loc1=this.getForceShort(arg1);
            var loc2=new DefInfo();
            loc2.name = NameRule.getDominionForceName(arg1);
            loc2.text1 = loc1.text1;
            return loc2;
        }

        public getRobFlagForce(arg1: int): DefInfo
        {
            return this.getItem("robFlagForce", arg1);
        }

        public getBossFieldShort(arg1: int): DefInfo
        {
            return this.getItem("bossFieldForce", arg1);
        }

        public getCrossBossFieldDefInfo(arg1: int): DefInfo
        {
            return this.getItem("crossBossField", arg1);
        }

        public getSex(arg1: int): DefInfo
        {
            return this.getItem("ESex", arg1);
        }

        public getSkillType(arg1: int): DefInfo
        {
            return this.getItem("ESkillType", arg1);
        }

        public getSkillUseType(arg1: int): DefInfo
        {
            return this.getItem("ESkillUseType", arg1);
        }

        public init(): void
        {
            var loc1=ConfigManager.instance.getJSONByFileName("gamedef.xml");
            this.write(loc1.root);
            return;
        }

        public getDefaultModel(arg1: int): DefInfo
        {
            return this.getItem("ECampModel", arg1);
        }

        public getEPrictUnitImg(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("EPrictUnitImg", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getEPrictUnitName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("EPrictUnitName", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getEShopCode(arg1: int): int
        {
            var loc1=0;
            var loc2=this.getItem("EShopCode", arg1);
            if (loc2) 
            {
                loc1 = int(loc2.name);
            }
            return loc1;
        }

        public getNpcStatus(arg1: int): int
        {
            return int(this.getItem("NpcStatus", arg1).name);
        }

        public getCareerDes(arg1: int): string
        {
            return this.getItem("CareerDes", arg1).name;
        }

        public getCareerDefInfo(arg1: int): DefInfo
        {
            return this.getItem("CareerDes", arg1);
        }

        public getCycleReward(arg1: int): string
        {
            return this.getItem("CycleTaskReward", arg1).name;
        }

        public getTransportCoinReward(arg1: int): int
        {
            return int(this.getItem("TransportLevelReward", arg1).text1);
        }

        public getTransportLevelReward(arg1: int): string
        {
            return this.getItem("TransportLevelReward", arg1).name;
        }

        public getTransportColorReward(arg1: int): string
        {
            return this.getItem("TransportColorReward", arg1).name;
        }

        public getTransportPledge(arg1: int): string
        {
            return this.getItem("TransportPledge", arg1).name;
        }

        public getTransportInsure(arg1: int): string
        {
            return this.getItem("TransportPledge", arg1).text1;
        }

        public getGuideAutoType(arg1: int): int
        {
            var loc1=this.getItem("GuideAutoType", arg1);
            if (loc1) 
            {
                return parseInt(loc1.name);
            }
            return 1;
        }

        public getPositionName(arg1: int): string
        {
            return this.getItem("EGuildPosition", arg1).name;
        }

        public getRoleAttrDesc(arg1: int): string
        {
            return this.getItem("RoleAttrDesc", arg1).name;
        }

        public getPetAttrDesc(arg1: int): string
        {
            return this.getItem("PetAttrDesc", arg1).name;
        }

        public getLoadMapConfig(arg1: int): Array<any>
        {
            var loc1=this.getItem("LoadMapConfig", arg1);
            if (loc1 == null) 
            {
                return null;
            }
            return loc1.name.split(",");
        }

        public getGuildBuildingName(arg1: int): string
        {
            return this.getItem("EGuildStructureType", arg1).name;
        }

        public getNpcByEffect(arg1: int, arg2: int=-1): Object
        {
            var loc1=null;
            if (arg2 != -1) 
            {
                loc1 = this.getNpcEffectInfo(arg1, arg2);
            }
            else 
            {
                loc1 = this.getItem("NPCEffect", arg1);
            }
            if (!loc1) 
            {
                throw new Error("未知的功能NPC effect=" + arg1);
            }
            return {"npcId": loc1.text1, "mapId": loc1.name};
        }

        public static get instance(): GameDefConfig
        {
            if (GameDefConfig._instance == null) 
            {
                GameDefConfig._instance = new GameDefConfig();
            }
            return GameDefConfig._instance;
        }

        /* internal  */getNpcEffectInfo(arg1: int, arg2: int): DefInfo
        {
            var loc1=null;
            var loc2=null;
            var loc3=null;
            if (!this._npcEffectDic) 
            {
                this._npcEffectDic = new Map<any, any> /* flash.utils.Dictionary */();
                loc2 = this._xmlDic["NPCEffect"].item as Array<any>;
                var loc4=0;
                var loc5=loc2;
                for(loc3 of loc5) 
                {
                    loc1 = new DefInfo();
                    loc1.type = "NPCEffect";
                    loc1.name = loc3.text;
                    loc1.id = loc3.id;
                    loc1.text1 = loc3.text1;
                    loc1.text2 = loc3.text2;
                    loc1.value = loc3.value;
                    this._npcEffectDic[loc1.id + "_" + loc1.name] = loc1;
                }
            }
            return this._npcEffectDic[arg1 + "_" + arg2];
        }

        public getGuildTaskNPC(): Array<any>
        {
            return this._xmlDic["GuildTaskNPC"].item as Array<any>;
        }

        public getCopyNPCList(): Array<any>
        {
            return this._xmlDic["CopyNpc"].item as Array<any>;
        }

        public getCopyNpc(arg1: int): Array<any>
        {
            var loc1=int(arg1 / 100);
            if (loc1 != 7004) 
            {
                if (loc1 == 7008) 
                {
                    arg1 = 700801;
                }
            }
            else 
            {
                arg1 = 700401;
            }
            var loc2=this.getItem("CopyNpc", arg1);
            if (loc2) 
            {
                return loc2.name.split(",");
            }
            return [];
        }

        public getDragNPC(arg1: int): Array<any>
        {
            var loc1=this.getItem("DragNPC", arg1);
            if (loc1 == null) 
            {
                return null;
            }
            return loc1.name.split(",");
        }

        public getBussinessNpc(): Array<any>
        {
            return this._xmlDic["BussinessNpc"].item as Array<any>;
        }

        public getPetMeetStatusName(arg1: int): string
        {
            return this.getItem("PetMeetStatus", arg1).name;
        }

        public getGuildBuildingDesc(arg1: int): string
        {
            return this.getItem("GuildBuildingDesc", arg1).name;
        }

        public getGuildBuildingInfo(arg1: int): DefInfo
        {
            return this.getItem("GuildBuildingDesc", arg1);
        }

        public getGuildBuildingUpgradeDesc(arg1: int): string
        {
            return this.getItem("GuildBuildingDesc", arg1).text1;
        }

        public getGuildRewardBloom(): int
        {
            return int(this.getItem("GuildLevelExp", -1).name);
        }

        public getGuildRewardContribution(): int
        {
            return int(this.getItem("GuildLevelExp", -2).name);
        }

        public getGuildRewardLevelExp(): number
        {
            return Number(this.getItem("GuildLevelExp", -3).name);
        }

        public getCopyMapByCopyId(arg1: int): int
        {
            return this.getItem("CopyMap", arg1) ? int(this.getItem("CopyMap", arg1).name) : 0;
        }

        public getBussinessRewardMoney(): int
        {
            return int(this.getItem("RunBuinessExp", -4).name);
        }

        public getBussinessRewardBloom(): int
        {
            return int(this.getItem("RunBuinessExp", -1).name);
        }

        public getBussinessRewardContribution(): int
        {
            return int(this.getItem("RunBuinessExp", -2).name);
        }

        public getBussinessRewardExp(): number
        {
            return Number(this.getItem("RunBuinessExp", -3).name);
        }

        public getCareerModelCode(arg1: int): int
        {
            return int(this.getItem("CareerModel", arg1).name);
        }

        public getTransportInfo(arg1: int): DefInfo
        {
            return this.getItem("TransportInfo", arg1);
        }

        public getIntimateNameById(arg1: int): string
        {
            return this.getItem("IntimateName", arg1).name;
        }

        public getIntimateName(arg1: int): string
        {
            var loc2=0;
            var loc1=this.getIntimateList();
            loc2 = 0;
            while (loc2 < loc1.length) 
            {
                if (arg1 < loc1[loc2]) 
                {
                    return this.getItem("IntimateName", loc2 + 1).name;
                }
                ++loc2;
            }
            return this.getItem("IntimateName", loc1.length).name;
        }

        public getIntimateList(): Vector.<int>
        {
            var loc1=0;
            if (!GameDefConfig.vcLevelIntimate) 
            {
                GameDefConfig.vcLevelIntimate = new Vector.<int>();
                loc1 = 0;
                while (loc1 < 10) 
                {
                    GameDefConfig.vcLevelIntimate.push(this.getIntimate(loc1 + 1));
                    ++loc1;
                }
            }
            return GameDefConfig.vcLevelIntimate;
        }

        public getIntimate(arg1: int): int
        {
            return int(this.getItem("Intimate", arg1).name);
        }

        public getMallBuyTaskItemDes(arg1: int): string
        {
            return this.getItem("MallBuyTaskItem", arg1).name;
        }

        public getSectarianInfo(): Array<any>
        {
            return this._xmlDic["SectarianInfo"].item as Array<any>;
        }

        public getSkillBookGetInfo(arg1: int): string
        {
            var loc1=this.getItem("SkillBookGet", arg1);
            if (loc1) 
            {
                return loc1.name;
            }
            return "";
        }

        public getWareHouseNpc(): Array<any>
        {
            return this._xmlDic["WareHouseNpc"].item as Array<any>;
        }

        public getAutoFightRange(arg1: int=0): int
        {
            var loc1=this.getItem("AutoFightRange", arg1);
            if (loc1) 
            {
                return int(loc1.name);
            }
            return this.getAutoFightRange();
        }

        public getAutoFightPoint(arg1: int=0): Object
        {
            var loc1=this.getItem("AutoFightPoint", arg1);
            if (loc1) 
            {
                return {"x": int(loc1.name), "y": int(loc1.text1)};
            }
            return this.getAutoFightPoint();
        }

        public getChristmasDate(arg1: int): string
        {
            return this.getItem("ChristmasDate", arg1).name;
        }

        public getGuideGrilHead(): string
        {
            return this.getItem("guideGril", 0).name;
        }

        public isGuideGrilHead(arg1: string): Boolean
        {
            return arg1 == this.getGuideGrilHead();
        }

        public getHuntInfo(): string
        {
            return this.getItem("HuntInfo", 0).name;
        }

        public getNationalNPC1(arg1: int): Array<any>
        {
            var loc1=this.getItem("NationalNPC", arg1);
            if (loc1 == null) 
            {
                return null;
            }
            return loc1.name.split(",");
        }

        public getGuildCopyWuxingNPC(arg1: int): Array<any>
        {
            var loc1=this.getItem("GuildCopyWuxingNpc", arg1);
            if (loc1 == null) 
            {
                return null;
            }
            return loc1.name.split(",");
        }

        public getNationalNPC2(arg1: int): Array<any>
        {
            var loc1=this.getItem("NationalNPC", arg1);
            if (loc1 == null) 
            {
                return null;
            }
            return loc1.text1.split(",");
        }

        public getNationalExpBase(): int
        {
            var loc1=this.getItem("NationalAward", 0);
            if (loc1) 
            {
                return int(loc1.name);
            }
            return 0;
        }

        public getNationalExpLevel(): int
        {
            var loc1=this.getItem("NationalAward", 0);
            if (loc1) 
            {
                return int(loc1.text1);
            }
            return 0;
        }

        public getMagicWeaponRankingReward(arg1: int): Array<any>
        {
            var loc1=this.getItem("MagicWeaponRankingReward", arg1);
            if (loc1) 
            {
                return loc1.text1.split("#");
            }
            return [];
        }

        public getNationalHonorBase(): int
        {
            var loc1=this.getItem("NationalAward", 1);
            if (loc1) 
            {
                return int(loc1.name);
            }
            return 0;
        }

        public getNationalRate(): number
        {
            var loc1=this.getItem("NationalAward", 2);
            if (loc1) 
            {
                return Number(int(loc1.name) / int(loc1.text1));
            }
            return 0;
        }

        public getNationalTotalNum(): int
        {
            var loc1=this.getItem("NationalAward", 3);
            if (loc1) 
            {
                return int(loc1.name);
            }
            return 0;
        }

        public getGuildCopyQuestionNpc(): DefInfo
        {
            return this.getItem("GuildCopyQuestionNPC", 0);
        }

        public getWuxingName(arg1: int): string
        {
            return this.getItem("wuxing", arg1).name;
        }

        public getWuxingList(): Array<any>
        {
            return this._xmlDic["wuxing"].item as Array<any>;
        }

        public getWuxingTileName(arg1: int): string
        {
            return this.getItem("WuxingTile", arg1).name;
        }

        public getWuxingSkillEffect(arg1: int): string
        {
            return this.getItem("wuxing", arg1).text2;
        }

        public getPlayDiceEachSide(arg1: int): string
        {
            return this.getItem("PlayDiceEachSide", arg1).name;
        }

        public getPlayDiceRewardEx(arg1: int): string
        {
            return this.getItem("PlayDiceRewardEx", arg1).name;
        }

        public getPlayDiceNFUName(arg1: int): string
        {
            return this.getItem("PlayDiceNFUName", arg1).name;
        }

        public getPlayDiceRewardAttribute(arg1: int): string
        {
            return this.getItem("PlayDiceRewardAttribute", arg1).name;
        }

        public getArenaCrossFinalNumText(arg1: int): string
        {
            var loc1=this.getItem("ArenaCrossFinalNumText", arg1);
            if (loc1) 
            {
                return loc1.name;
            }
            return "";
        }

        public getActiveIconChange(): Array<any>
        {
            if (this._xmlDic.hasOwnProperty("ActiveIcon")) 
            {
                if (typeof this._xmlDic["ActiveIcon"].item === "array") 
                {
                    return this._xmlDic["ActiveIcon"].item as Array<any>;
                }
                return [this._xmlDic["ActiveIcon"].item];
            }
            return null;
        }

        public getBossMapPoint(): Array<any>
        {
            return this._xmlDic["BossMap"].item as Array<any>;
        }

        public getHuntTaskReward(arg1: int): Array<any>
        {
            return this.getItem("HuntTaskReward", arg1).name.split("#");
        }

        public getHuntTaskBag(arg1: int): Array<any>
        {
            return this.getItem("HuntTaskBag", arg1).name.split(",");
        }

        public getLGXBEventTypeInfo(arg1: int): DefInfo
        {
            var loc1=this.getItem("LGXBEventType", arg1);
            if (loc1.value == 0) 
            {
                loc1.text2 = loc1.text2.replace(new RegExp("\\[", "g"), "<");
                loc1.text2 = loc1.text2.replace(new RegExp("\\]", "g"), ">");
                loc1.text2 = loc1.text2.replace(new RegExp("\\\\n", "g"), "<br/>");
                loc1.value = 1;
            }
            return loc1;
        }

        public getArenaRewardInfo(arg1: int): DefInfo
        {
            return this.getItem("ArenaReward", arg1);
        }

        public getCrossBossRewardInfo(arg1: int, arg2: int): DefInfo
        {
            return this.getItem("CrossBossReward", arg1 * 10000 + arg2);
        }

        public getGangFightsFaceName(arg1: int): string
        {
            if (arg1 <= 0) 
            {
                arg1 = 1;
            }
            if (arg1 > 12) 
            {
                arg1 = 12;
            }
            return this.getItem("GangFightsFace", arg1).name;
        }

        public getERewardName(arg1: int): string
        {
            return this.getItem("reward", arg1).name.split("　").join("");
        }

        public getOldHeadIconName(arg1: string): string
        {
            return this.getItem("OldHeadIconName", parseInt(arg1)).name;
        }

        public getLoveTaskGiveItem(arg1: int, arg2: Boolean, arg3: Boolean, arg4: Boolean): Array<any>
        {
            var loc2=null;
            var loc3=0;
            var loc1=arg2 ? 2 : 1;
            if (arg1 != ESex._ESexMan) 
            {
                loc2 = this.getItem("LoveGive", loc1).text1.split(",");
            }
            else 
            {
                loc2 = this.getItem("LoveGive", loc1).name.split(",");
            }
            if (arg4) 
            {
                if (arg2) 
                {
                    loc3 = arg3 ? 5 : 6;
                }
                else 
                {
                    loc3 = arg3 ? 3 : 4;
                }
                if (arg1 != ESex._ESexMan) 
                {
                    loc2.push(this.getItem("LoveGive", loc3).text1);
                }
                else 
                {
                    loc2.push(this.getItem("LoveGive", loc3).name);
                }
            }
            return loc2;
        }

        public getLoveTaskGiveItemCost(arg1: Boolean, arg2: Boolean, arg3: Boolean): Array<any>
        {
            var loc3=0;
            var loc1=arg1 ? 2 : 1;
            var loc2=this.getItem("LoveGive", loc1).text2.split("#");
            if (arg3) 
            {
                if (arg1) 
                {
                    loc3 = arg2 ? 5 : 6;
                }
                else 
                {
                    loc3 = arg2 ? 3 : 4;
                }
                loc2.push(this.getItem("LoveGive", loc3).text2);
            }
            return loc2;
        }

        public getLoveTaskComment(arg1: int): Array<any>
        {
            if (arg1 == ESex._ESexMan) 
            {
                return this.getItem("LoveComment", 1).name.split("#");
            }
            return this.getItem("LoveComment", 1).text1.split("#");
        }

        public getLoveTaskCommentValue(): Array<any>
        {
            return this.getItem("LoveComment", 1).text2.split("#");
        }

        public getPetLifeStyleName(arg1: int): string
        {
            return this.getItem("EPetLifeStyle", arg1).name;
        }

        public getGuildAnimalRewards(arg1: int): Array<any>
        {
            var loc3=null;
            var loc4=0;
            var loc5=0;
            var loc1=[];
            var loc2=this.getItem("GuildAnimalReward", arg1);
            if (loc2) 
            {
                loc3 = loc2.text1.split("#");
                loc5 = 0;
                while (loc5 < loc3.length) 
                {
                    loc4 = int(loc3[loc5]);
                    loc1.push(new ItemData(loc4));
                    ++loc5;
                }
            }
            return loc1;
        }

        public getBossfieldClifford(arg1: int): DefInfo
        {
            return this.getItem("BossfieldClifford", arg1);
        }

        public getGuildPartyRewards(arg1: int): Array<any>
        {
            var loc3=null;
            var loc4=0;
            var loc5=0;
            var loc1=[];
            var loc2=this.getItem("GuildPartyReward", arg1);
            if (loc2) 
            {
                loc3 = loc2.name.split("#");
                loc5 = 0;
                while (loc5 < loc3.length) 
                {
                    loc4 = int(loc3[loc5]);
                    loc1.push(new ItemData(loc4));
                    ++loc5;
                }
            }
            return loc1;
        }

        public getSnowManRewards(): Array<any>
        {
            var loc3=null;
            var loc4=0;
            var loc5=0;
            var loc1=[];
            var loc2=this.getItem("SnowManReward", 0);
            if (loc2) 
            {
                loc3 = loc2.name.split("#");
                loc5 = 0;
                while (loc5 < loc3.length) 
                {
                    loc4 = int(loc3[loc5]);
                    loc1.push(new ItemData(loc4));
                    ++loc5;
                }
            }
            return loc1;
        }

        public getNpcAward(arg1: int): DefInfo
        {
            return this.getItem("npcAward", arg1);
        }

        public getHeroCopyExplain(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("heroCopyExplain", arg1);
            if (loc2) 
            {
                loc1 = HTMLUtil.getHtmlByComp(loc2.name);
            }
            return loc1;
        }

        public getCopyDropTime(arg1: int): Array<any>
        {
            var loc3=null;
            var loc4=0;
            var loc5=null;
            var loc1=[];
            var loc2=this.getItem("copyDropTime", arg1);
            if (loc2) 
            {
                loc3 = loc2.name.split("、");
                loc4 = 0;
                while (loc4 < loc3.length) 
                {
                    loc5 = String(loc3[loc4]).split(",");
                    loc1.push(loc5);
                    ++loc4;
                }
            }
            return loc1;
        }

        public getNpcAwardByEffect(arg1: int): DefInfo
        {
            var loc1=null;
            var loc2=null;
            var loc3=null;
            if (!this._npcAwardDic) 
            {
                this._npcAwardDic = new Map<any, any> /* flash.utils.Dictionary */();
                loc2 = this._xmlDic["npcAward"].item as Array<any>;
                var loc4=0;
                var loc5=loc2;
                for(loc3 of loc5) 
                {
                    loc1 = new DefInfo();
                    loc1.type = "npcAward";
                    loc1.name = loc3.text;
                    loc1.id = loc3.id;
                    loc1.text1 = loc3.text1;
                    loc1.text2 = loc3.text2;
                    loc1.value = loc3.value;
                    this._npcAwardDic[loc1.type + "_" + loc1.value] = loc1;
                }
            }
            return this._npcAwardDic["npcAward_" + arg1];
        }

        public getEveryDayActiveInfo(arg1: int): DefInfo
        {
            return this.getItem("EveryDayActive", arg1);
        }

        public getNPCNotAddToStageArray(): Array<any>
        {
            return this._xmlDic["NPCNotAddToStage"].item;
        }

        public getChineseNum(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("ChineseNum", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getMagicWeaponPropertyName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("MagicWeapon", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public GameDefConfig.get exchangeEffectList(): Array<any>
        {
            var loc1=null;
            var loc2=null;
            if (!this._exchangeEffectList) 
            {
                loc1 = this.getItem("NPCExchangeEffect", 1);
                loc2 = loc1.name;
                this._exchangeEffectList = loc2.split(",");
            }
            return this._exchangeEffectList;
        }

        public getPetType(arg1: int, arg2: int): int
        {
            var loc1=0;
            var loc2=int(arg1.toString() + arg2.toString());
            var loc3;
            if (loc3 = this.getItem("petType", loc2)) 
            {
                loc1 = int(loc3.name);
            }
            return loc1;
        }

        public getCrossBossFieldName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("crossBossField", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getIsFootNeedRotation(arg1: string): Boolean
        {
            var loc3=null;
            var loc1=false;
            var loc2=this._data["footType" + "-" + arg1];
            if (loc2) 
            {
                loc1 = (loc3 = (loc2 as DefInfo).name) && !(loc3 == "0");
            }
            return loc1;
        }

        public getPetIslandGuildPosName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("EGuildPos", arg1);
            if (loc2) 
            {
                loc1 = HTMLUtil.addColor(loc2.name, loc2.text1);
            }
            return loc1;
        }

        public getPetIslandPlaceTypeName(arg1: int, arg2: int=0): string
        {
            var loc1="";
            var loc2;
            if (loc2 = this.getItem("PetIslandPlaceType", arg1)) 
            {
                if (arg2 != 0) 
                {
                    loc1 = HTMLUtil.addColor(loc2.name + "<br>" + loc2.text3, loc2.text1);
                }
                else 
                {
                    loc1 = HTMLUtil.addColor(loc2.name.substr(0, 2), loc2.text1);
                }
            }
            return loc1;
        }

        public getPetIslandName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("PetIslandPlaceType", arg1);
            if (loc2) 
            {
                loc1 = HTMLUtil.addColor(loc2.text2, loc2.text1);
            }
            return loc1;
        }

        public getFigureToLetter(arg1: int, arg2: Boolean=true): string
        {
            var loc1="";
            var loc2;
            if (loc2 = this.getItem("FigureToLetter", arg1)) 
            {
                loc1 = arg2 ? loc2.name : loc2.text1;
            }
            return loc1;
        }

        public getSpiritEquipMaxStrength(arg1: int): int
        {
            var loc1=0;
            var loc2=this.getItem("SpiritEquipStrength", arg1);
            if (loc2) 
            {
                loc1 = parseInt(loc2.name);
            }
            return loc1;
        }

        public getSpiritEquipExTypeName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("ESpiritEquipExTypeName", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getSpiritEquipTypeName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("ESpiritEquipTypeName", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        public getSpiritEquipName(arg1: int, arg2: int): string
        {
            var loc1=this.getSpiritEquipExTypeName(arg1);
            var loc2=this.getSpiritEquipTypeName(arg2);
            return StringHelper.substitute(loc2, loc1);
        }

        public getFahunName(arg1: int): string
        {
            var loc1="";
            var loc2=this.getItem("FanhunName", arg1);
            if (loc2) 
            {
                loc1 = loc2.name;
            }
            return loc1;
        }

        /* internal */ /* var */_data: Map<any, any> /* flash.utils.Dictionary */;

        /* internal */ /* var */_xmlDic: Map<any, any> /* flash.utils.Dictionary */;

        /* internal */ /* var */_npcEffectDic: Map<any, any> /* flash.utils.Dictionary */;

        /* internal */ /* var */_npcAwardDic: Map<any, any> /* flash.utils.Dictionary */;

        /* internal */ static /* var */_instance: GameDefConfig;

        /* internal */ /* var */_exchangeEffectList: Array<any>;

        /* internal */ static /* var */vcLevelIntimate: Vector.<int>;
    }
